﻿using System;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using eLoop;

namespace eNets.CBK.Sockets;

abstract class ASocketRcvOper : ASocketOper
{
    public ASocketRcvOper(Socket socket, SocketCompletedDelegate rcvCompleted, ITaskScheduler scheduler)
        : base(socket, scheduler, rcvCompleted)
    {
    }

    [MethodImpl(MethodImplOptions.AggressiveInlining)]
    public void ReceiveAsync(Memory<byte> memory)
    {
        base.SetArgsBuffer(memory);
        this.SocketOperationCombineAsync();
    }
}